/**
 * 功能描述
 */

define(function (require, exports, module) {
	var CouponGrid = require("grid");
	
    var instance = {
        initComponent: function (params,widget) {
        	var coupongrid = new CouponGrid({
        		parentNode: ".J-coupongrid",
        		autoRender: false,
        		show: false,
        		model: {
        			columns:[{
        				name: "cardNo",
        				label: "编号",
        			},{
        				name: "count",
        				label: "充值次数",
        			},{
        				name: "returnCertificateTotal",
        				label: "充值总金额(元)",
        				
        			},{
        				name: "consumptionTotal",
        				label: "消费金额(元)",
        				
        			},{
        				name: "cashTotal",
        				label: "取现金额(元)",
        				
        			},{
        				name: "balance",
        				label: "余额(元)",
        				
        			}]
        		}
        	});
        	
        	$(".J-coupongrid").find(".box-content").before($("<div></div>").addClass("box-header")
        			.append($("<div></div>").addClass("title").text("消费券")));
        	widget.set("coupongrid",coupongrid)
        }
    };
    module.exports = instance;
});
